package com.glls.stock.controller;

import com.glls.common.vo.OrderVo;
import com.glls.stock.service.StockService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * TODO
 *
 * @author junyang
 * @version 1.0.0
 * @date 2025/2/24 14:48
 */
@RestController
@RequestMapping("/stock")
@Slf4j
public class StockController {


    @Resource
    private StockService stockService;
    @PostMapping("/updateStock")
    public int updateStock(@RequestBody OrderVo order){
        return stockService.updateStock(order);
    }


    @GetMapping("/testStock")
    public String testStock(){
        log.info("testStock");
        return "testStock";
    }
}
